<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<%@include file="/WEB-INF/commons/taglibs.jsp"%>
<%@include file="/WEB-INF/commons/common-header.jsp"%>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
</head>
<body>
	<form:form method="post" modelAttribute="keywordTag" id="form">
		<input type="hidden" name="_method" value="${_method }" />
		<!--content start-->
		<ul class="s_bodyR">
			<li class="s_li_head">类目管理</li>
			<li class="s_adduTable">
				<table width="800" border="0">
					<tr>
						<td width="176" class="s_addutName">所属类目：</td>
						<td width="289" class="s_add_select">
							<select name = "belongKeywordTag">  
								<c:choose>
									<c:when test="${empty keywordTag.father.id }">
									<option value="" >一级目录</option>
										<c:forEach items="${keywordTagNames }" var="names">
												<option value="${names.id }">${names.name }</option>
										</c:forEach>
									</c:when>
									<c:otherwise>
										<option value="" >一级目录</option>
										<c:forEach items="${keywordTagNames }" var="names">
											<c:if test="${empty names.father.id }">
												<c:choose>
													<c:when test="${keywordTag.father.id eq names.id }">
														<option value="${names.id }" selected>${names.name }</option>
													</c:when>
													<c:otherwise>
														<option value="${names.id }" >${names.name }</option>
													</c:otherwise>
												</c:choose>
												<c:forEach items="${names.children }" var="child">
													<option value="${child.id}" >- - - -${child.name }</option>
												</c:forEach>
											</c:if>
										</c:forEach>
									</c:otherwise>
								</c:choose>
							</select> 
						</td>
						<td width="321" class="s_addutTips"></td>
					</tr>
				    <tr>
						<td class="s_addutName">类目名称：</td>
						<td><form:input path="name" id="name" type="text" class="s_tInput" /></td>
						<td class="s_addutTips"></td>					
					</tr>
					<tr>
						<td class="s_addutName">类目连接：</td>
						<td><form:input path="path" id="path" type="text" class="s_tInput" /></td>
						<td class="s_addutTips"></td>					
					</tr>
					<tr>
						<td class="s_addutName">类目排序：</td>
						<td><form:input path="sort" id="sort" type="text" class="s_tInput" /></td>
						<td class="s_addutTips">例如：1</td>					
					</tr>
					<tr>
						<td></td>
						<td><p class="s_brpLeft">
								<input id="ok" type="submit" value="提交" class="s_submit" />&nbsp;
								<button id=“back” class="s_button" onclick="javascript:history.go(-1);">返回</button>
							</p></td>
						<td></td>
					</tr>
				</table>
			</li>
		</ul>
		<!--content end-->
	</form:form>
</body>
</html>